<%@ Page Language="C#" AutoEventWireup="true" Codebehind="CommunityAdmin.aspx.cs"  errorPage="~/Error.aspx"
    Inherits="SecurityLinkUp.Admin.CommunityAdmin" Title="Community Admin" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<html>
<body>
    <form id="Form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel" runat="server">
            <ContentTemplate>
                <asp:Label ID="CommunitySelectLbl" runat="server" Text="Communitys I Admin"></asp:Label>&nbsp;<asp:DropDownList
                    ID="CommunitiesSelect" runat="server" Width="265px" AutoPostBack="True" OnSelectedIndexChanged="Communitieselect_SelectedIndexChanged">
                </asp:DropDownList>&nbsp;
                <asp:CheckBox ID="AdminModeChk" runat="server" AutoPostBack="True" OnCheckedChanged="AdminModeChk_CheckedChanged"
                    Text="Set Admin Mode" Visible="False" />
                <cc1:ListSearchExtender ID="CommunityListSearchExtender" runat="server" TargetControlID="CommunitiesSelect"
                    PromptPosition="Bottom">
                </cc1:ListSearchExtender>
                <br />
                <br />
                <br />
                <table cellpadding="5" style="width: 414px">
                    <tr>
                        <td valign="top" style="width: 95px">
                            Community Name</td>
                        <td style="width: 130px" valign="top">
                            <asp:TextBox ID="CommunityName" runat="server" Width="195px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td valign="top" style="width: 95px">
                            Description<br />
                            <small>[Describe what this community is/does]</small>
                        </td>
                        <td style="width: 130px" valign="top">
                            <asp:TextBox ID="CommunityDescritpion" runat="server" Rows="4" TextMode="MultiLine"
                                Width="200px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width: 95px" valign="top">
                            Status</td>
                        <td style="width: 130px" valign="top">
                            <asp:DropDownList ID="StatusList" runat="server" Width="207px">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td valign="top" style="width: 95px">
                            Status Notes<br />
                            <small>[Reasons/justifications given for the current status]</small></td>
                        <td style="width: 130px" valign="top">
                            <asp:TextBox ID="CommunityReason" runat="server" Rows="4" TextMode="MultiLine" Width="199px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="CommunityErrorMessage" CssClass="ErrorMessage" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="DeleteBtn" runat="server" Text="Delete" Visible="False" />&nbsp;
                            &nbsp;<asp:Button ID="EditCommunityBtn" runat="server" Text="Save Changes" OnClick="SaveCommunityBtn_Click" /></td>
                    </tr>
                </table>
                <br />
                <cc1:ModalPopupExtender ID="DeletePopup" runat="server" TargetControlID="DeleteBtn"
                    PopupControlID="DeletePopupPanel" BackgroundCssClass="modalBackground" OkControlID="ConfirmDeleteBtn"
                    CancelControlID="CancelBtn" DropShadow="false" />
                <br />
                <asp:Panel ID="DeletePopupPanel" CssClass="WarningPopup" Style="display: none;" runat="server"
                    Width="396px">
                    <p>
                        Are you sure you want to delete this Community?</p>
                    <p>
                        Usually, a Community can be set to "INACTIVE" to keep it in the database but not
                        shown to users until one is <b>absolutly</b> sure it should be deleted.</p>
                    <p>
                        Continue to delete anyway?</p>
                    <div style="text-align: center">
                        <asp:Button ID="ConfirmDeleteBtn" runat="server" Text="Delete" OnClick="ConfirmDeleteBtn_Click" />&nbsp;
                        <asp:Button ID="CancelBtn" runat="server" Text="Cancel" />
                    </div>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
